package com.project.fiveCerealsSavoury.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.project.fiveCerealsSavoury.domain.Trade;
import com.project.fiveCerealsSavoury.domain.User;
import com.project.fiveCerealsSavoury.exception.BizException;

public interface UserDao {
	/**
	 * 添加用户
	 * @param user
	 * @return
	 */
	public int insert(User user);
	/**
	 * 查询用户
	 * @param id
	 * @return
	 */
	public User query(String name,String passwd);
	/**
	 * 修改用户信息
	 * @param user
	 * @return
	 */
	public int set(@Param("newPasswd")String newPasswd,@Param("newPhone")String newPhone,@Param("userId")Integer userId);
	/**
	 * 充值
	 * @param user
	 * @return
	 */
	public int addMoney(@Param("money")Double money,@Param("id")Integer id);
	
	public User queryId(Integer userId);
	
	public List<User> queryName(User user);
	/**
	 * 查询所有管理员
	 */
	public List<User> queryIsAdmin(String isAdmin);
	
	public boolean remove(Integer id);
	/**
	 * 修改是否签收状态
	 */
	public boolean remend(@Param("id")Integer id,@Param("isSign")String isSign);
	
}
